<?php $this->extend('comm/page');?>

<form class="layui-form form-horizontal" action="<?php echo $container->request->pathinfo();?>" method="post">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">父级:</label>
        <div class="col-xs-12 col-sm-8">
            <?php echo $this->build_select('pid', $rule, $selected);?>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">链接地址:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="name" lay-verify="required" lay-verType="tips" lay-reqText="请输入链接地址"
                placeholder="请输入链接地址" class="layui-input">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">菜单名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="title" lay-verify="required" lay-verType="tips" lay-reqText="请输入菜单名称"
                autocomplete="off" placeholder="请输入菜单名称" class="layui-input">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">图标Icon:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input type="text" lay-verify="required" lay-verType="tips" lay-reqText="请选择图标Icon"
                    placeholder="请选择图标Icon" class="form-control bootstrap-layui-input" id="icon" name="icon"
                    value="fa fa-link" />
                <a href="javascript:;" class="btn-search-icon input-group-addon">查找图标</a>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">权重:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="layui-input" name="sort" value="0" lay-verify="required|number"
                lay-verType="tips" placeholder="请输入排序权重" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">备注:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="layui-textarea" name="remark" placeholder="菜单备注信息"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            <?php echo $this->build_radios('status', ['1'=>'有效', '2'=>'无效'], 1, [], true); ?>
        </div>
    </div>
    <div class="layui-form-item hidden layer-footer">
        <div class="col-xs-12 text-right">
            <button type="submit" class="btn btn-success" lay-submit lay-filter="add">确认提交</button>
            <button type="reset" class="btn btn-default">重置</button>
        </div>
    </div>
</form>
